<template>
  <EwgDialog ref="Dialog" @close="close()" modal>
    <div class="attr-dialog">
      <div class="header">
        <span>角色背包与装备</span>
        <span class="pointer" @click="close()">关闭</span>
      </div>
      <div class="grid-container">
        <div class="attr-content">
          <Attrs></Attrs>
        </div>
        <div class="wear-content">
          <EquipPack></EquipPack>
        </div>
        <div class="pack-content">
          <TabBox></TabBox>
        </div>
      </div>
      <div class="footer"></div>
    </div>
  </EwgDialog>
</template>
<script lang="ts">
import { ref } from "vue";
import TabBox from "../Store/TabBox.vue";
import EquipPack from "./EquipPack.vue";
import Attrs from "./Attrs.vue";
export default {
  name: "PackDialog",
  components: {
    TabBox,
    EquipPack,
    Attrs
  },
  setup() {
    const Dialog = ref();
    const close = () => {
      Dialog.value.close();
    };
    const open = () => {
      Dialog.value.open();
    };
    return {
      Dialog,
      close,
      open
    };
  }
};
</script>
<style lang="scss" scoped>
.attr-dialog {
  width: 500px;
  background: $--color-black-half-quarter;
  color: #eee;
  border: 3px solid $--color-white;
  padding: 20px;
  border-radius: $--border-radius;
  .header {
    display: flex;
    justify-content: space-between;
  }
  .grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 150px 1fr;
    gap: 0px 0px;
    grid-template-areas:
      "attr-content attr-content"
      "wear-content pack-content";
    margin-top: 5px;
    border-top: 1px solid $--color-white;
  }
  .attr-content {
    grid-area: attr-content;
    border-bottom: 1px solid $--color-white;
  }
  .wear-content {
    grid-area: wear-content;
    border-right: 1px solid $--color-white;
    padding: 5px 10px 0 10px;
  }
  .pack-content {
    grid-area: pack-content;
    padding: 5px 0 5px 8px;
    position: relative;
  }
}
</style>
